from django.db import models
from dvadmin.utils.models import CoreModel, table_prefix
import time

# Create your models here.
# class NodeInfo(CoreModel):
#     opr = models.CharField(max_length=64, verbose_name="算法名称", help_text="算法名称")
#     params = models.JSONField("详细参数")
# 
# 
# class EdgeInfo(CoreModel):
#     src_id = models.CharField(max_length=64, verbose_name="起点ID", help_text="起点ID")
#     dst_id = models.CharField(max_length=64, verbose_name="终点ID", help_text="终点ID")


class GraphInfo(CoreModel):
    title = models.CharField(max_length=64, verbose_name="流程名称", help_text="流程名称", default="算法"+str(time.time()))
    description = models.CharField(max_length=255, verbose_name="算法流程描述", help_text="算法流程描述", default=None)
    data = models.JSONField(default=dict)


